using System;
using System.Collections;
namespace BMC.ARSystem
{
	internal class TupleDataLoader : DataLoader
	{
		private ArrayList _tuples;
		public ArrayList Data
		{
			get
			{
				return this._tuples;
			}
		}
		public TupleDataLoader(string dataFileName) : base(dataFileName)
		{
			base._beginLoadingEH += new BeginLoadingEventHandler(this.OnBeginLoading);
			base._loadDataLineEventEH += new LoadDataLineEventHandler(this.OnLoadDataLine);
			base._afterLoadedEH += new AfterLoadedEventHandler(this.OnAfterLoaded);
			base.Load();
		}
		internal void OnBeginLoading(object sender, BeginLoadingEventArgs e)
		{
			TupleDataLoader tupleDataLoader = (TupleDataLoader)sender;
			tupleDataLoader._tuples = new ArrayList();
		}
		internal void OnLoadDataLine(object sender, LoadDataLineEventArgs e)
		{
			TupleDataLoader arg_06_0 = (TupleDataLoader)sender;
			this._tuples.Add(TupleDataLoader.LineParts(e.DataLine));
		}
		internal void OnAfterLoaded(object sender, AfterLoadedEventArgs e)
		{
			TupleDataLoader tupleDataLoader = (TupleDataLoader)sender;
			tupleDataLoader._tuples.Sort();
		}
		internal static ArrayList LineParts(string str)
		{
			string[] array = str.Split(new char[]
			{
				'|'
			});
			int i = 0;
			int num = array.Length;
			while (i < num)
			{
				array[i] = array[i].Trim();
				i++;
			}
			return new ArrayList(array);
		}
	}
}
